package com.forte.categoryservice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import com.forte.categorydao.Category;
import com.forte.categorydao.CategoryDAO;

public class CategoryServiceImpl implements CategoryService{
	
	@Autowired
	@Qualifier("categoryDAO")
	private CategoryDAO categoryDao;
	
	public void setCategoryDAO(CategoryDAO categoryDao){
		this.categoryDao = categoryDao;
	}

	public void saveOrUpdate(Category category) {
		categoryDao.saveOrUpdate(category);		
	}

	public Category findCategoryById(int categoryId) {
		return categoryDao.findCategoryById(categoryId);
	}

}
